practice writing functions with chapter 3