add main function.