The highlight function could be optimized/use a better solution. We may also need to thread the highlighting.