Code written in half, main.c