adding basic caching functionality