refactor dump methods
improved test coverage