moved nasty event query into event interface