made new function to addBranch