changed random seed and answered first question in TeX