completed cache matrix assignment

my two functions and comments