adjust to video add some functions