made the last example more robust