WIP: refactoring
WIP: declarative adaptor