added material reading.