change dataservice function to have object options