programGenerator write switch