complete data source logic