It's late, so I actually have no idea what I did, but as far as I can tell, the code works.