refactor new taskmanager