Code to order median delay change