circle logic