Added Objective-C version