improvement on templates triggers dependencies
merge