better ordering of frees