working on caching the training