1.change svgDoc from function to list
2. added to.character for svgDoc