datasets refactoring 2