changed run_tar function