more work on outputing svg