updated user input functionality