save roomid logic