Implemented cachematrix first version