updated the code with makeCacheMatrix and cacheSolve functions