cacheSolve function has been formatted