Changed the method for obtaining rings.