lattice needs refactoring
Merge branch 'dev'