- Upgraded code to support iOS8