add init method with data provider and table view.