now produces example xml output
rearraged functions added a test circ to play around with apply versions of things.
hlint