update code for iPad

ipad adating