Updated the example for inheritance.