cachematrix implemented and test case added