update for iOS7 and switch changes