made other changes to master main.c