implement REST client instead of embedded
implement REST client instead of embedded