sorting out buttons and selects