moved input handling to input_handler.dart