refactoring subject pool ORM queries. Fix #62