Reintroduce `port` function, second attempt.