refine tokenization step