Same mass of a rarefied gas has more internal energy than the compressed gas when kept at same temperature. Why?

Equal masses of gases have equal amount of internal K.E. at same temperature. In rarefied gas, molecules are at more distance from each other than in compressed gas. These molecules possess more interned P.E. It makes total internal energy of the rarefied gas more than that of the compressed gas.