I wrote a bunch of code. Some of it works.