now generates hooks