add functionality to build up DataSource*