set up base template, environment hook