croak when ref to hash passed