creating functions chap 5