updated to support unicode