Flawless logic to use on the NSA