update using room class in main loop