svg implementation optimized