code to test brances