fixed formatting and added some explanations