this produces cachematrix for programming assignment 2