changed word wrap logic and removed text formatting