update to main.c