Implement switching branch method

a lot of merges