#35 refactored query factory methods
#35 refactored query factory methods