refactored arrangeOnCircle