video function is buggy, but working