optimized code for typo correction using typed arrays instead of string objects - this way we do not put pressure on the GC