added if not for empty task list