added code from class 5: OOP by example