changes to main.c