removed the hack in to_hash