Why replace the foreach?