refac and styling of input element