bare main function