implement func dump