extract common content provider code to DataProvider