identical function is working now and I do not know exactly why -- I think it has to do with my both_branches function...