removed redundant parameter passing for task_count