added comments to the validator class