refactoring of svg code (still need to do arc)