commenting code. algorithm works with null wormholes now