maybe finally finished the user input function