example 3-2: simple guards