calculate arcs properly. fixes #4