renamed and moved template file
consolidated template code