works with different numbers of circles now