implement parse and dump function