add the main function