refactor with modern obj-c syntax and better use of ios6 patterns