read in materials and added matrix structure