renamed queryChar to queryIndex and fragmentChar to fragmentIndex