some work on res.tex