Initial query helper implementation