initial version of cache matrix and tests