more work on input functionality