implement Task class