convert to modern objective c