max halo distance implemented