makeCacheMatrix and cacheSolve implementations