added -z option and fixed inconsistent usage of is_in