[add] #with method to set default before/after hooks