to_hash is deprecated, switch to to_h