changed HashMap to HashSet
double --> float in lattice