Task class definition