create truncate method