working out base template