refactored the segregates events toolkit