restructed for task server