trying to translate example 9 into what I want