Use query instead of collection