Working pull-from-port script