some helper method when IOS program