functions chapter + exercises 2-7