cachematrix my solution