refactored dump command