This is more involved than I thought, but at least I'm making some sort of progress. Sorta.