updated for ios 6