handleInput refactor
Tests input