My changes to the cachematrix function