provide a callback which return two params [before, after].