rest adapter refactoring