changed some issues and added my while loop.