moving some functions to videoextension