Updated Objective-C version to use arc