refactoring codes... (change svg logic)