using inheritance template