cachematrix final with comments