filtering events and coloring