added registration hook