use service factory instead of http
update tests