implement message truncation