register hook context