Fix compilation error
Add logic function which will link 1st and 2nd outputs