implementing walker to dump to c