move range operation to tokenizer module