Sort:  

what do you mean with complex? Anything i can write easier?