lots of work to get tex and materials working