Converted to modern Objective-C