Cache Matrix

for assignment 2