begin to calc two braches