update a order function