got rid of some magic numbers, added validation to make sure at least one check box is checked