work on input functionality