complete cachematrix function