If you are interested have a look here:
https://gist.github.com/jbucaran/8dc33b7947f3193eb2ea3d5700e...