material class refactor