implement REST client instead of embedded