created a working cachematrix