minor changes + added some explanations comments