add toPrint method for task