split next_room method into two separate methods while refactoring