Added truncate text function