added thread wrapper, proof-of-concept.