midterms solutions