updated highlight logic