simplify queries for events api