rearranged the code:   src/main.c