updated inputHandler