branch flow calculations added