added thread-based version of the mockup