moved Query method to command level