DRYing casted_hash