edited cachematrix