modified transport.c