How do I make my checkbox list so that the conditions required are met?