Added iPad detection code