pass query as arg to get it right