thread model templated