created the cachematrix according to the cachemean function, and adding the required comments