added simple caching.