indented the code , and added comments .