use sparse matrix conversions at various points