improved ido flex matching