updated code to implement function makeCacheMatrix and cacheSolve according to the requirement of the assignment