Included a canBeCompleted method for checking whether the task can be completed