new version
tested sample text using unicode utf-8