refactor material