Updated task class