Revise tokenize method.