created function for calcCirc