improve truncate method
remove console.log