refactor adapters