checkbox and radio button functionality