add template inheritance