refactor the dump string