adding while loop to run updates continuously