refactor datasource into two elements