work in progress, implement caching