changes to work with 2 data sources