converted the addtask function to the new transformer stack