gsom basic structure and the lattice bug fix