added new variable to find out video source