test code in main