minor speedups for the lattice case