input handler works