cachematrix functions inserted