Added input handler.