add a new task algorithm as the stratege pattern.