changes to main.c for Microsoft compiler