Debugged Mikes gr8 code