added primitive arc() implementation