Handle input by the user