use zhash instead of typecasting