handleInput argument added