implement safeguard checks (see stanford design doc)