dynamic addition of rooms

- make the 'prev' & 'next' buttons work properly for dynamically added
rooms. Currently only work for hardcoded rooms.