second refactor:extract data operations to datahub