correction endforeach