truncate fn