added fn decl's in main.c