My attempt to switch to using obj-c