made changes to function cacheSolve to remove a minor error