hook to control task add in main.c