updated makeCacheMatrix and cacheSolve functions based on the given description