truncate method added