refactor to create service data directly