change the tdivwhere2 main function