added getting material id