add big-switch abstraction, some overlay code