added helper truncate