Implement task class