ex35: branches and functions