truncate helper