add setBranch method