Almost fixed @cvan's code on the first try.

womp womp