dump implemented, not yet fully tested