added comments to main controller