added caching for DOM element