Objective c implementation