Abdullah - Moved Truncate function