added code and comments to cacheSolve