factory refactor