small validation of material is added to function 'load'