Base for functions in branch.java