add caching mechanism