added a threaded demo but threading doesn't work yet