add gateway.c