more flexible template inheritance