got a rough version of split videos working, needs cleaning and simplification