add main function to test