Changed for loop to while and removed grabthisdate