finally moved main file from test.c to main.c