added logic and comments for makeCacheMatrix and cacheSolve functions