changed for adpted for IOS