changed the latticeAlgorithm interface