Solved the CacheMatrix problem