added tests for cachematrix and updated comments for cachematrix