added foreach variant without shutdown