included the stateManager ... and tried to write another function in lightandgroupctrl for counting the favorite-colors