udate main thread process