couch test and modularize callbacks