handle different branches better