created to make code DRYer with template files