define task as struct