cachematrix updated as per Assignment 2 inverted matrix