inhertance and vritual fuunction