Added  query for each event