added file for main.c
edited main method