added simple input handling