complete the cachematrix