dump method implementation.