docs for lattice code