added ipad and iphone seperation support