rewrote drawSegment for arcSegment, also fixed syntax problems