Please refactor this as a data provider