Added option to disable switch branch method