add dumping methods for testing