worked through while example #1