using tempalte inheritance