added comments and scripts to cachematrix