added comments to main