moved testsparsematrix here