Took a while to understand how it works :)