updates the order