adding objective-c native code for comparison