splitting main.c in 2 files