alert added, iPad compatibility added