delete main function