Added template inheritance