extract dependencies
update template reference