learning the branch model