moved next_episode check to its own if()