fixed 'extern' definition in main.c