functionality added for changing order