converted into modern objective-c syntax