bunch of fixes, now only work on cloned file, more to come