refactor video