change task_length to double type