added ability to handle subclasses in repo.