beginning iOS portion