everything working, but some runtime errors related to destroying Mats and Vecs