first draft of cachematrix