writing of the dump() method