looped the user inputs