add while loop script