Sort:  

I would have solved it almost exactly like this :-)