finished CSE lattice implementation. needs testing.