updated episode handling