Added input handler