convert to ifLeft/ifRight calls