adding a dump function