updated makeCacheMatrix and cacheSolve functions