Sort:  

Thank you. The code is available on github, enjoy )