few improvments in sparsity pattern
more improvments in sparsity pattern