Receive_thr now sends received messages to main()