added modified logic_compare block