added caching of partial results