update the code with some more modern objc crap