modify task with generic type