updated for ios8