implemented method to use DOM as datasource