added suppor for selects and checkboxes