More explanations on the code