added comments to the remaining code.