Sort:  

Thanks a lot @rufans for your advice.
I'll improve it for my next contribution.