first working version, does not remove files