dump and refactor