added download loop