Code and supplements for room clustering process