Finished the 2-part exercise 23