generator registration hook