updated to create datasource as a static member