move message handling on new thread; need to parse messages