some minor updates to main.c