added comments to cachematrix function