complete the main function in test.c