Maybe refactor the else here in to a local def that's used in both the case where `x.size >= y.size` and `x.size < y.size`?