improve figure of threads and change package to use lualatex