add showEvents function