made selectbestmerge generic for all comparables