finish lattice service and unit test