Taken out the updating of user input into a private method