modify material order functions