added empty lines
put try in while loop
rename currAtlas