Here's exercise 24. It combines all (most) concepts that I've learned so far.