foo = maximumBy (compare `on` fst) xs