Added even query functionality