updated to modern obj-c