combining code for arc and circles - preliminary