use new structure for tasks and messages.