template inheritance implemented