create cachesolve and makecachematrix