restructuring port passing