Possible objective-c implementation