Just mvoed around some things and added some output