SelectionQ: Name -> ... to IORef Int -> ...
separate Q from Definition