changing gap for distance