added additional code to account for iPhone 5s