refactored data provider code
fixed elementTransformer failing on option types