added caching for DOM element

Minimized DOM request to improve performance.
Thanks!