Added option for global hooks