loop for loading map