made changes to cachematrix file for assignment