modify ordering to pass unit test