finished example 4