Assignment 2 Matrix Caching code