make _compute_hooks public as get_hooks