more flexible base template