Adding the create_datasource function