implement truncate