Closest point search in lattices with some applications