commit main function