main.c: made a little more readable