circle detection (finished)