switching message inf to main thread