adds $event to sortByType for on and off states