refactor: query