added initial caching features, will branch further from here
added initial caching features, will branch further from here
minor fix