Replaced the preferred method selection with Comparator that sorts the methods in preferred order.