add master.c and slave.c