added rooms as an parameter