gaps inserted
refactor based on @odoh code
add rooms
Merge remote-tracking branch 'upstream/master'