Implement initial version of dump algorithm