Completed challenge 39 (skipping ahead a bit because why not).