use template hooks instead of hardcoding in templates