Half way through implementing switch logic