added comments and hitTestRing method