Converting Sample code to ARC