modified truncate