add and fix all methods for task class