extract callback base, refactoring, doc