Updated to use video function