Note url explaining this code.