updated, but req to fix message passing between threads