changes in closeRing method