how we do global hooks