created a video toggle function