updated sieve
added submatrix sums