adapted to tarball/3