moved a whole bunch of stuff around, and modified string interpolation to save typing some %s