just look at this absolutely brilliant piece of code, I am in awe