fixed algorithm for circle