Added task object constructor