fix user_input function so that it does not throw error messages when user enter invalid move