made changes to cachematrix