upgraded to modern Objective-C syntax