adding  functions to extract branch name and numner