clean up
ready to clean up lattice
refactoring