try to find preferred mode first then non preferred