trying to make work on iOS 6