Wrote this with a basic text editor on a whim, fixed in sublimetext