to check the function of branch