inputField as an independent function