divfactory and refactoring