reduce global variable clutter
parameterize the highlighting