Assignment 2 (cached matrix inversion) solved