Try and handle this better via a lattice-like structure.