Rewote class 4 example 2