added first next-episode related code