Finishing buid_rooms function