Procedure for conditional highlighting