working on code for iOS.