simplified branch checking