New algorithm for connecting burrows to the ground line