I would like to have a better explanation within the code, trying to explain a little bit the 'magic' behind this.