added comments to max