Rearanged some of the code Chris added (LOL i am really picky about
where the {} are)