truncate string tests passing
refactored truncate string