modification main function