How to do calculations based on checkboxes