add an instance variable to the template test
remove dup code