Take branch outside of for-loop