room logic