making svg rendering more flexible