makecacheMatrix and cacheResolve functions