loop for screenshot