Completed version of cachematrix