inheritance templates