added module for caching matrix solving