public and private inheritance