added code to cacheSolve