arranged indentations and added comments to code