Factor out transport_to_ap