added missing "endforeach;"; code formatting
code formatting