used sessions to fix the video_sort and multiple_sort connection