refactor to use unicode package