updated the main() in receive.c