added some main.c part