5th homework for TA OOP course