chekcing before branch