Added Objective-C implementation