cachematrix updated

Added the code