complete cachematrix problem