script to register callback hooks