refine the input field