apply callbacks in global context