changes made to adapt to iOS7