added caching for svg elements