Added flx mode for a better ido flex matching