Simplifies highlightProcess and makes it more robust