inheritance example in class