assignment 2 cache inversing matrix