I don't think this code is needed, simply set `ttl` to 0 and the main loop will add the correct number of targets for you.