unit test, factory refactor