refactor QueryAPI to have execute task method: