testing: flattening link creation logic