introduced query language. added query factory