add switch inst support