improved zip and tar function