refactor hybrid query call