Modify for cachematrix code.

Finish assignment.