use templating in above lines