implement truncate()