add registration hook