Small modification to example 2