Added setup function to template (oops!)