move data handler into data service