added do while loop