Refining input functionality