some changes to example 5