implement -z flag