improved dump functionallity