HORRIBLE typo last few lines duplicated!!!