before branch switch