check in initial solution for the cache inverted matrix.
adding comments for the functions and overall description.