exercise 5b: prototyping and bufio learning