started work on caching and logging