implemented the cachematrix
updated documentation