add sparse matrix tools