flush user input before waiting for enter key