making function for room generation