created an implementation of ModelQuery