Updated Material code