almost final highlight function