add leader and main function