refactoring, material factory