added caching mechanism