getting rid of task.isavailable, solving it directly in tasks_availabe