testing of the branch function