add truncate method