There are more than 800 caves built on the cliffs in Dunhuang. Why were they built? Technically how were the caves built in the middle of a desert? What are the functions of different caves?