truncation function