improve code to produce arcs

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>