merging main.c