changed {flag, on, off} to flag in shcema