can't believe I wasn't using warnings! also, ensure matches keep the rest of the line
slight redesign so we can save state