merged cacheSolve() into cachedMatrix()