finish custom queries for events