added iphone & ipad optimization