insert main function