changed NSLog to NSDebug