updated LaTeX Solution for Ex2