base template setup