add secondary while loop for wget