Write working makeCacheMatrix and cacheSolve functions