Updated code for makeCacheMatrix and cacheSolve functions