implement cube and checkbox logic