modify order function